package com.mallcloud.mall.common.data.resolver;

import com.mallcloud.mall.admin.api.entity.SysTenant;
import com.mallcloud.mall.admin.api.feign.RemoteTenantService;
import com.mallcloud.mall.common.core.constant.SecurityConstants;
import com.mallcloud.mall.common.core.util.SpringContextHolder;
import lombok.experimental.UtilityClass;

/**
 * 租户解析器
 */
@UtilityClass
public class TenantResolver {

	public SysTenant getById() {
		return SpringContextHolder.getBean(RemoteTenantService.class).info(SecurityConstants.FROM_IN).getData();
	}
}
